package com.joysuch.wwyt.common.entity;

import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;

import java.time.LocalDateTime;
import java.util.Date;

import com.joysuch.wwyt.common.entity.UserDataEntity;
import com.joysuch.wwyt.core.support.AutoSetCommonFieldListener;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import org.springframework.data.jpa.domain.support.AuditingEntityListener;

import javax.persistence.*;

import static javax.persistence.GenerationType.IDENTITY;

/**
 * <p>
 *
 * </p>
 *
 * @author zqw
 * @since 2021-05-31
 */
@Data
@Entity
@EntityListeners({AuditingEntityListener.class, AutoSetCommonFieldListener.class})
@EqualsAndHashCode(callSuper = true)
@Accessors(chain = true)
@TableName("wwyt_excel_table")
@ApiModel(value = "ExcelTable对象", description = "")
public class ExcelTable extends UserDataEntity {

    private static final long serialVersionUID = 1L;


    @Id
    @ApiModelProperty(value = "id")
    @GeneratedValue(strategy = IDENTITY)
    @Column(name = "ID", unique = true, nullable = false)
    private Long id;


//    @ApiModelProperty(value = "id")
//    @TableId(value = "id", type = IdType.AUTO)
//    private Long id;

    @ApiModelProperty(value = "表名")
    private String tableName;

    @ApiModelProperty(value = "备注")
    private String remark;

    @ApiModelProperty(value = "查询字段")
    private String selectField;

    @ApiModelProperty(value = "修改字段")
    private String updateField;

    @ApiModelProperty(value = "显示字段")
    private String showField;

    @ApiModelProperty(value = "不显示时的值")
    private Integer unshowValue;

}
